import request from '@/router/axios';
// 获取当前模板
export const getOwnTemplate = params => {
  return request({
    url: '/api/beetles-business/operatoraccount/cost-report-template/get-own-template',
    method: 'GET',
    params
  })
}
// 日期横排
export const statisticsCostReportByDateHorizontal = (params,data) => {
  return request({
    url: '/api/beetles-business/operatoraccount/cost-report/statistics-cost-report-by-date-horizontal',
    method: 'POST',
    params,
    data
  })
}
// 日期竖排
export const statisticsCostReportByDateVertical = (params,data) => {
  return request({
    url: '/api/beetles-business/operatoraccount/cost-report/statistics-cost-report-by-date-vertical',
    method: 'POST',
    params,
    data
  })
}

// 合计
export const statisticsCostReportByDateVerticalTotal = (params,data) => {
  return request({
    url: '/api/beetles-business/operatoraccount/cost-report/statistics-cost-report-by-date-vertical-total',
    method: 'POST',
    params,
    data
  })
}
//默认模版合计
export const statisticsCostReportByDateVerticalTotalDefault = (params,data) => {
  return request({
    url: '/api/beetles-business/operatoraccount/cost-report/statistics-cost-report-by-date-horizontal-total',
    method: 'POST',
    params,
    data
  })
}
// 花费报告-日期横排-excel 导出
export const excelExport = (params,data) => {
  return request({
    responseType: 'blob',
    url: '/api/beetles-business/operatoraccount/cost-report/excelExport',
    method: 'POST',
    params,
    data
  })
}
// 查询订单
export const getOffer = query => {
  return request({
    url: '/api/beetles-business/remote-search/filter-offer',
    method: 'GET',
    params:{
      query
    }
  })
}
// 查询客户经理
export const getCustomerManager = query => {
  return request({
    url: '/api/beetles-business/remote-search/filter-customer-manager',
    method: 'GET',
    params:{
      query
    }
  })
}
// 查询客户
export const getCustomer = query => {
  return request({
    url: '/api/beetles-business/remote-search/filter-customer',
    method: 'GET',
    params:{
      query
    }
  })
}
// 查询账户
export const getAccount = query => {
  return request({
    url: '/api/beetles-business/remote-search/filter-account',
    method: 'GET',
    params:{
      query
    }
  })
}
// 查询账户运营人
export const getOperator = query => {
  return request({
    url: '/api/beetles-business/remote-search/filter-operator',
    method: 'GET',
    params:{
      query
    }
  })
}
// 查询销售经理
export const getSalesManager = query => {
  return request({
    url: '/api/beetles-business/remote-search/filter-sales-manager',
    method: 'GET',
    params:{
      query
    }
  })
}
// 保存模板
export const saveUpdateTemplate = data => {
  return request({
    url: '/api/beetles-business/operatoraccount/cost-report-template/save-update-template',
    method: 'POST',
    data
  })
}
// 删除
export const removeTemplateByids = ids => {
  return request({
    url: '/api/beetles-business/operatoraccount/cost-report-template/remove-template',
    method: 'DELETE',
    params: {
      ids
    }
  })
}
